﻿
<ExtensionModel>

	<!-- Extension Points -->
	<ExtensionPoint path = "/MonoDevelop/Refactoring/Refactorings" name = "Refactorings">
		<ExtensionNode name="Class"/>
	</ExtensionPoint>
	
	<ExtensionPoint path = "/MonoDevelop/Refactoring/CodeGenerators" name = "Code Generators">
		<ExtensionNode name="Class"/>
	</ExtensionPoint>

	<ExtensionPoint path = "/MonoDevelop/Refactoring/ASTProvider" name = "ASTProviders">
		<ExtensionNode name="Class"/>
	</ExtensionPoint>

	<ExtensionPoint path = "/MonoDevelop/Refactoring/CodeDiagnosticProvider" name = "Code Diagnostic Provider">
		<ExtensionNode name="Class"/>
	</ExtensionPoint>

	<ExtensionPoint path = "/MonoDevelop/Refactoring/FindReferencesProvider">
		<ExtensionNode name="Class"/>
	</ExtensionPoint>

	<ExtensionPoint path = "/MonoDevelop/Refactoring/FindReferenceUsagesProvider">
		<ExtensionNode name="Class"/>
	</ExtensionPoint>

	<ExtensionPoint path = "/MonoDevelop/Refactoring/JumpToDeclarationHandler" defaultInsertAfter = "MidStep">
		<ExtensionNode name="Class"/>
	</ExtensionPoint>

	<!-- Extensions -->

	<!--
	<Extension path = "/MonoDevelop/Ide/Pads">
		<Pad id="MonoDevelop.Refactoring.CodeIssuePad" _label="Code Issues" class="MonoDevelop.CodeIssues.CodeIssuePad" defaultPlacement = "Bottom"/>
	</Extension> -->
 	
	<!-- Text editor integration -->
	<Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
		<Class class = "MonoDevelop.AnalysisCore.Gui.ResultsEditorExtension" />
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/Editor/TooltipProviders">
		<Provider id="AnalysisResults" class="MonoDevelop.AnalysisCore.Gui.ResultTooltipProvider" insertafter="CompileError" />
	</Extension>
	
	<!-- RefactoryCommands -->
	<Extension path = "/MonoDevelop/Ide/Commands">

		<Category _name = "Code Navigation" id = "CodeNavigation">
		<Command id = "MonoDevelop.Refactoring.RefactoryCommands.GotoDeclaration"
						_label = "_Go to Declaration"
						shortcut = "F12"
						macShortcut = "Meta|D F12"/>
			
		<Command id = "MonoDevelop.Refactoring.RefactoryCommands.GotoImplementation"
						_label = "Go to Implementation"
				 		shortcut="Ctrl|F12"
				 		macShortcut=""/>
			
		<Command id = "MonoDevelop.Refactoring.Navigate.GotoBaseMember"
				 		_label = "Go to Base Member"
				 		shortcut=""
				 		macShortcut=""/>
			
		<Command id = "MonoDevelop.Refactoring.RefactoryCommands.FindReferences"
					_label = "_Find References" 
					shortcut = "Shift|F12"
					macShortcut = "Shift|Meta|R Shift|F12"/>
		<Command id = "MonoDevelop.Refactoring.RefactoryCommands.FindAllReferences"
					_label = "_Find References of All Overloads" />
		</Category>
		
		<Category _name = "Refactoring" id = "Refactoring">

		<Command id = "MonoDevelop.Refactoring.RefactoryCommands.QuickFix"
					_label = "Quick Fix..."
					shortcut = "Alt|Return"
					macShortcut = "Alt|Return" />
		
		<Command id = "MonoDevelop.Refactoring.RefactoryCommands.QuickFixMenu"
		         _label = "Quick Fix"
		         type = "array"
		         defaultHandler = "MonoDevelop.Refactoring.QuickFixMenuHandler" />

		<Command id = "MonoDevelop.Refactoring.RefactoryCommands.ImportSymbol"
					_label = "Import Symbol..."
					shortcut = "Control|Alt|space"
					macShortcut = "Control|Alt|space" />

		<Command id = "MonoDevelop.AnalysisCore.AnalysisCommands.ExportRules"
					defaultHandler = "MonoDevelop.AnalysisCore.ExportRulesHandler"
					_label = "Export C# Code Rules to a File" 
					_description = "Generates an HTML file that contains a list of all code rules"
					/>
		<Command id = "MonoDevelop.Refactoring.AnalyzeWholeSolution"
					defaultHandler = "MonoDevelop.Refactoring.AnalyzeWholeSolutionHandler"
					_label = "_Whole Solution" 
					/>
		<Command id = "MonoDevelop.Refactoring.AnalyzeCurrentProject"
					defaultHandler = "MonoDevelop.Refactoring.AnalyzeCurrentProjectHandler"
					_label = "_Current Project" 
					/>
		<Command id = "MonoDevelop.Refactoring.AnalyzeSource"
					defaultHandler = "MonoDevelop.Refactoring.AnalyzeSourceHandler"
					_label = "_Analyze Source" 
					/>
		</Category>

		<Category id="Hidden" _name="Hidden">
		<Command id = "MonoDevelop.Refactoring.RefactoryCommands.FindDerivedClasses"
					_label = "Find _Derived Symbols" />
		</Category>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
		<Class class = "MonoDevelop.CodeActions.CodeActionEditorExtension" />
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/MainMenu/Edit">
		<CommandItem id = "MonoDevelop.CodeGeneration.CodeGenerationCommands.ShowCodeGenerationWindow"
		             insertafter="MonoDevelop.Ide.Commands.TextEditorCommands.ShowParameterCompletionWindow" />
	</Extension>
	
	<!-- Options panels -->
	
	<Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/TextEditor">
		<Section id="Analysis" _label="Source Analysis" fill="true" class="MonoDevelop.AnalysisCore.Gui.AnalysisOptionsPanel" icon="md-prefs-code-analysis" >
			<Section id="C#" _label="C#" icon="md-prefs-source">
				<Panel id="CodeActions" _label="Code Actions" fill="true" class="MonoDevelop.CodeActions.CodeActionPanel" grouping="Tab" icon="md-prefs-code-actions" />
				<Panel id="CodeGeneration" _label="Code Generation" fill="true" class="MonoDevelop.Refactoring.CodeGenerationPanel" grouping="Tab" />
				<Panel id="CodeRules" _label="Code Rules" fill="true" class="MonoDevelop.CodeIssues.CodeRulePanel" grouping="Tab" icon="md-prefs-code-rules" />
			</Section>
		</Section>
	</Extension>
	
	<!-- Extensions to the addin points defined by this addin -->
    
	<Extension path="/MonoDevelop/Core/StockIcons">
		<StockIcon stockid="md-prefs-code-actions" resource="prefs-code-actions-16.png" size="Menu" />
		<StockIcon stockid="md-prefs-code-rules" resource="prefs-code-rules-16.png" size="Menu" />
		<StockIcon stockid="md-prefs-code-analysis" resource="prefs-code-analysis-16.png" size="Menu" />
	</Extension>

	<Extension path = "/MonoDevelop/Refactoring/JumpToDeclarationHandler">
		<Class id="MidStep" class="MonoDevelop.Refactoring.DummyJumpToDeclarationHandler" />
	</Extension>

	<Extension path = "/MonoDevelop/Ide/MainMenu/Project">
		<ItemSet 
			id = "Analyze"
			_label = "_Analyze">
			<CommandItem id = "MonoDevelop.Refactoring.AnalyzeWholeSolution" />
			<CommandItem id = "MonoDevelop.Refactoring.AnalyzeCurrentProject" />
		</ItemSet>
	</Extension>

	<Extension path="/MonoDevelop/Ide/ContextMenu/ProjectPad">
		<Condition id="ItemType" value="Solution|Project">
			<CommandItem id = "MonoDevelop.Refactoring.AnalyzeSource" insertbefore="MonoDevelop.Ide.Commands.SearchCommands.FindInFiles" />
		</Condition>
	</Extension>

	<Extension path="/MonoDevelop/Ide/Composition">
		<Assembly file="MonoDevelop.Refactoring.dll"/>
	</Extension>

	<ExtensionPoint path="/MonoDevelop/Refactoring/AnalyzerAssemblies">
		<ExtensionNode name = "Assembly" type = "MonoDevelop.Core.AddIns.AssemblyExtensionNode" />
	</ExtensionPoint>

	<Extension path="/MonoDevelop/Refactoring/AnalyzerAssemblies">
		<Assembly file="Microsoft.CodeAnalysis.CSharp" />
		<Assembly file="Microsoft.CodeAnalysis.CSharp.Features" />
		<Assembly file="Microsoft.CodeAnalysis.EditorFeatures" />
		<Assembly file="Microsoft.CodeAnalysis.EditorFeatures.CSharp" />
		<Assembly file="Microsoft.CodeAnalysis.Features" />
		<Assembly file="Microsoft.CodeAnalysis.VisualBasic" />
		<Assembly file="Microsoft.CodeAnalysis.VisualBasic.Features" />
	</Extension>

	<Extension path = "/MonoDevelop/TextEditor/CommandMapping">
		<Map id="MonoDevelop.Refactoring.RefactoryCommands.GotoDeclaration" argsType="Microsoft.VisualStudio.Text.Editor.Commanding.Commands.GoToDefinitionCommandArgs" />
		<Map id="MonoDevelop.Refactoring.RefactoryCommands.FindReferences" argsType="Microsoft.VisualStudio.Text.Editor.Commanding.Commands.FindReferencesCommandArgs" />
		<Map id="MonoDevelop.Refactoring.RefactoryCommands.GotoImplementation" argsType="@MonoDevelop.Refactoring.CommandArgsFactories.CreateGoToImplementationCommandArgs" />
		
		<!-- These mappings exist to ensure the new editor calls the new commands -->
		<Map id="MonoDevelop.Refactoring.RefactoryCommands.FindAllReferences" argsType="Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation.FindReferencesOfOverloadsCommandArgs" />
		<Map id="MonoDevelop.Refactoring.Navigation.FindBaseSymbols" argsType="Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation.FindBaseSymbolsCommandArgs" />
		<Map id="MonoDevelop.Refactoring.Navigation.FindDerivedSymbols" argsType="Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation.FindDerivedSymbolsCommandArgs" />
		
		<Map id="MonoDevelop.CSharp.Navigation.FindExtensionMethods" argsType="Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation.FindExtensionMethodsCommandArgs" />
		<Map id="MonoDevelop.CSharp.Navigation.FindMemberOverloads" argsType="Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation.FindMemberOverloadsCommandArgs" />
		<Map id="MonoDevelop.CSharp.Navigation.FindImplementingMembers" argsType="Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation.FindImplementingMembersCommandArgs" />
	</Extension>
	
	<Extension path="/MonoDevelop/TextEditor/ContextMenu/Editor">
		<Condition id="FileType" mimeTypes="text/x-csharp">
			<ItemSet id="Navigate" _label="Navigate" insertbefore="Separator1">
				<CommandItem id="MonoDevelop.Refactoring.RefactoryCommands.FindAllReferences" />
				<CommandItem id="MonoDevelop.Refactoring.Navigation.FindBaseSymbols" />
				<CommandItem id="MonoDevelop.Refactoring.Navigation.FindDerivedSymbols" />
				<SeparatorItem id="SeparatorNavigate1" />
				<CommandItem id="MonoDevelop.CSharp.Navigation.FindExtensionMethods" />
				<CommandItem id="MonoDevelop.CSharp.Navigation.FindMemberOverloads" />
				<CommandItem id="MonoDevelop.CSharp.Navigation.FindImplementingMembers" />
			</ItemSet>
		</Condition>
	</Extension>

	<Extension path="/MonoDevelop/Core/SystemInformation">
		<Class class="MonoDevelop.Refactoring.RoslynInformationProvider" />
	</Extension>
</ExtensionModel>
